typedef HRESULT (WINAPI *TD3DXCreateCubeTextureFromFileInMemoryEx)(
  _In_     LPDIRECT3DDEVICE9 pDevice,
  _In_     LPCVOID pSrcData,
  _In_     UINT SrcDataSize,
  _In_     UINT Size,
  _In_     UINT MipLevels,
  _In_     DWORD Usage,
  _In_     D3DFORMAT Format,
  _In_     D3DPOOL Pool,
  _In_     DWORD Filter,
  _In_     DWORD MipFilter,
  _In_     D3DCOLOR ColorKey,
  _Inout_  D3DXIMAGE_INFO *pSrcInfo,
  _Out_    PALETTEENTRY *pPalette,
  _Out_    LPDIRECT3DCUBETEXTURE9 *ppCubeTexture
);

TD3DXCreateCubeTextureFromFileInMemoryEx OldD3DXCreateCubeTextureFromFileInMemoryEx;

DllExport HRESULT cc D3DXCreateCubeTextureFromFileInMemoryEx(
  _In_     LPDIRECT3DDEVICE9 pDevice,
  _In_     LPCVOID pSrcData,
  _In_     UINT SrcDataSize,
  _In_     UINT Size,
  _In_     UINT MipLevels,
  _In_     DWORD Usage,
  _In_     D3DFORMAT Format,
  _In_     D3DPOOL Pool,
  _In_     DWORD Filter,
  _In_     DWORD MipFilter,
  _In_     D3DCOLOR ColorKey,
  _Inout_  D3DXIMAGE_INFO *pSrcInfo,
  _Out_    PALETTEENTRY *pPalette,
  _Out_    LPDIRECT3DCUBETEXTURE9 *ppCubeTexture
)
{
	return OldD3DXCreateCubeTextureFromFileInMemoryEx (pDevice, pSrcData, SrcDataSize, Size,MipLevels,Usage,Format,Pool,Filter,MipFilter,ColorKey,pSrcInfo,pPalette,ppCubeTexture);
}
